#ifndef __public_h
#define __public_h



#include "gt32f030_conf.h"
#include "stdio.h"

#ifndef uint8_t
#define uint8_t		unsigned char 
#define uint16_t 	unsigned short  
#define uint32_t 	unsigned int 
#endif

#ifndef u8
#define u8		unsigned char 
#define u16 	unsigned short  
#define u32 	unsigned int 
#endif

#ifndef s8
#define s8		signed char 
#define s16 	signed short  
#define s32 	signed int 
#endif

#ifndef vu8
#define vu8		volatile unsigned char 
#define vu16 	volatile unsigned short  
#define vu32 	volatile unsigned int 
#endif

#define cpu_96m		0

#include "task.h"
#include "peripheral.h"
#include "bmp_data.h"
#include "lcd.h"
#include "flash.h"
#if cpu_96m
#define sys_init()	SystemCoreClock = 96000000U;\
	RCC_EnablePLL(RCC_PLLCfg_96M);\
	RCC_EnableLIRC();\
	RCC_SystemClkSwitch(RCC_SysClkSel_PLL);\
	RCC_SetAHBPrescaler(0);\
	RCC_SetAPBPrescaler(0)
#else
#define sys_init()	SystemCoreClock = 72000000U;\
	RCC_EnablePLL(RCC_PLLCfg_72M);\
	RCC_EnableLIRC();\
	RCC_SystemClkSwitch(RCC_SysClkSel_PLL);\
	RCC_SetAHBPrescaler(0);\
	RCC_SetAPBPrescaler(0)
#endif
extern u32 col[4095];
#define __delay_ms	LL_mDelay	
#define __delay_us	LL_uDelay	
#endif